<!DOCTYPE html>
<html lang="zh-Hans-CN">
<head>
  <meta charset="UTF-8">
  <title>正交投影照相机</title>
</head>
<body onload="init()">
<a href="http://www.ituring.com.cn/article/48955">原始效果</a><br/>
<script src="three.min.js"></script>
<script>

  /* 参数
   -----------------------------------------------------------------

   THREE.OrthographicCamera(left, right, top, bottom, near, far)

   -----------------------------------------------------------------
   */

  function init() {
    var renderer = new THREE.WebGLRenderer();
    renderer.setSize(400, 300);
    document.getElementsByTagName('body')[0].appendChild(renderer.domElement);
    renderer.setClearColor(0x000000);

    var scene = new THREE.Scene();


//		var camera = new THREE.OrthographicCamera(-2, 2, 1.5, -1.5, 1, 10);
//		var camera = new THREE.OrthographicCamera(-1, 1, 1.5, -1.5, 1, 10);
//		camera.position.set(0, 0, 5);

    var camera = new THREE.OrthographicCamera(-2, 2, 1.5, -1.5, 1, 10);
    camera.position.set(6, -3, 5);
    camera.lookAt(new THREE.Vector3(0, 0, 0)); // *

    scene.add(camera);


    var cube = new THREE.Mesh(new THREE.CubeGeometry(1, 1, 1),
        new THREE.MeshBasicMaterial({
          color: 0xff0000,
          wireframe: true
        })
    );
    scene.add(cube);

    renderer.render(scene, camera);
  }
</script>
</body>
</html>